package java56_3;

import java.util.Scanner;

public class ClassManager {

	public static void main(String[] args) {
		JavaClass c = new JavaClass();
		c.name = "java56班";
		c.teacher = "孔梅";
		c.beginDate = "2018-9-20";
		Scanner sc = new Scanner(System.in);
		int ch = 0;
		while (true) {
			System.out
					.println("1:加新学员 2：查看班级信息 3:查找学员  4：开除学员  5:按照范围查找   9:退出");
			ch = sc.nextInt();
			switch (ch) {
			case 1:
				System.out.println("输入新学员的姓名：");
				// String name=sc.next();
				c.addNewStu(sc.next());
				break;
			case 2:
				c.showInfor();
				break;
			case 4:
				System.out.println("请输入要退学的学生：");
				c.resign(sc.next());

				break;
			case 5:
				System.out.println("请输入七点：");
				int kaishi = sc.nextInt();
				System.out.println("请输入终点：");
				int end = sc.nextInt();
				System.out.println("查找的名字：");
				String sname = sc.next();
				boolean in = c.searchinfo(kaishi, end, sname);
				System.out.println(in ? "找到了" : "这个范围内没有这个人");
				break;
			case 9:
				return;
			}
		}
	}

}
